package com.hmkj.core.po.system;

import com.alibaba.fastjson.annotation.JSONField;
import com.hmkj.common.baseMapper.GenericPo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Table;
import java.util.Date;
import java.util.function.Consumer;


/**
 * 后台接口调用日志实体信息<br>
 *
 * @author xxw
 * @date   2017-09-18 11:56:52
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "后台接口调用日志")
@Table(name = "s_log")
public class Log extends GenericPo<Integer> {

    public static final String TABLE_NAME = "s_log";

	
	/**操作IP地址**/
	@ApiModelProperty(value = "操作IP地址")
	private String ip;
	/**URL**/
	@ApiModelProperty(value = "URL")
	private Object uri;
	/**操作方式**/
	@ApiModelProperty(value = "操作方式")
	private String method;
	/**操作结果**/
	@ApiModelProperty(value = "操作结果")
	private String code;
	/**操作提交的数据**/
	@ApiModelProperty(value = "操作提交的数据")
	private Object params;
	/**异常信息**/
	@ApiModelProperty(value = "异常信息")
	private Object exception;

    public Log(){}

    public Log(Consumer<Log> consumer){
    consumer.accept(this);
    }
}

